@extends('layout.app') @section('content')

<div class="box-body">

    <table id="rowed3"></table>
    <div id="prowed3"></div>

</div>
<!-- CKEDITOR -->
<script type="text/javascript" src="/js/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="/js/ckeditor/adapters/jquery.js"></script>
<script type="text/javascript" src="/js/jquery.upload.js"></script>
<script>

    $(document).ready(function() {
        var data = {
            url: "/payway",
            colNames: ["ID", "支付名称", "api类型", "url", "提交方式", "排序", "是否使用", "图片地址"],
            colModel: [{
                name: 'id',
                sortable: false,
                key: true
            }, {
                name: 'pay_name',
                editable: true,
                editrules: {
                    required:true
                }
            }, {
                name: 'api_type',
                editable: true,
                stype: 'select',
                searchoptions: {
                    sopt: ["eq" , "ne"],
                    value: "form:form;redirect:redirect"
                },
                editable: true,
                edittype: 'select',
                editoptions: {
                	value: "form:form;redirect:redirect"
                }
            },{
                name: 'pay_url',
                editable: true,
                editrules: {
                    required: true,
                }
            }, {
                name: 'method_type',
                editable: true,
                stype: 'select',
                searchoptions: {
                    sopt: ["eq" , "ne"],
                    value: "post:post;get:get"
                },
                editable: true,
                edittype: 'select',
                editoptions: {
                    value: "post:post;get:get"
                }
            }, {
                name: 'sort',
                editable: true,
                editrules: {
                    required: true,
                    number: true,
                    min: 0
                }
            }, {
                name: 'is_show',
                editable: true,
                edittype: 'select',
                editoptions: {
                    value: "0:否;1:是"
                },
                formatter: function(cellvalue) {
                	cellvalue = cellvalue.toString();
                    if(cellvalue == "1") {
                        return '是';
                    }else{
                        return '否';
                    }
                }
            },{
                name: 'icon',
                editable: true,
                sortable: false,
            }],
            caption: '<i class="fa fa-table"></i> {{$label2}}',
            editurl: "/payway/edit",
            sortname: "sort",
            sortorder: "asc",
            height:'auto',
            autowidth: true,
        };
        jqGrid(data, true, true, true);
    });

</script>

@endsection